package com.hm.one;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Cat {
	
	private String name;
	private Integer age;
	private String color;
	@Autowired
	private Fish fish;
	
	public Fish getFish() {
		return fish;
	}
	
	public Cat() {
	}
	
	public Cat(String name, Integer age, String color) {
		
		this.name = name;
		this.age = age;
		this.color = color;
	}
	
	public void setFish(Fish fish) {
		this.fish = fish;
	}

	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}
	public String getColor() {
		return color;
	}
	public void setColor(String color) {
		this.color = color;
	}
	
	@Override
	public String toString() {
		return "Cat [name=" + name + ", age=" + age + ", color=" + color + ", fish=" + fish + "]";
	}
	
	
}
